Component({
    properties: {
        mode: {
            type: String,
            observer: function(t) {
                t && this.toggleShowFlag(t);
            }
        }
    },
    data: {
        showFlag: !1,
        isInit: !1
    },
    ready: function() {
        var t = getApp().globalData.originSite;
        t.sid ? this.setData({
            showFlag: !0,
            isInit: !0,
            originSite: t
        }) : this.setData({
            showFlag: !1
        });
    },
    methods: {
        back: function() {
            var t = this.data.originSite.pageindex, i = getCurrentPages().length - 1;
            getApp().globalData.originSite = {}, wx.navigateBack({
                delta: i - t
            });
        },
        toggleShowFlag: function(t) {
            this.data.isInit && this.setData({
                showFlag: "view" === t
            });
        }
    }
});